import request from '@/utils/request';
// 充电柜管理 list
export function listCabinets(url, method, data) {
  let datas = {
    url: '/api/chargingCabinet' + url,
    method: method
  };
  if (method == 'get') {
    datas.params = data;
  } else {
    datas.data = data;
  }
  return request(datas);
}


// 场站网点 list
export function listNetworksAll(url, method, data) {
  let datas = {
    url: '/api/chargingNetwork' + url,
    method: method
  };
  if (method == 'get') {
    datas.params = data;
  } else {
    datas.data = data;
  }
  return request(datas);
}
// 设备类型管理 list
export function allCharges(url, method, data) {
  let datas = {
    url: '/api/chargingCabinetType' + url,
    method: method
  };
  if (method == 'get') {
    datas.params = data;
  } else {
    datas.data = data;
  }
  return request(datas);
}
// 型号信息管理 list
export function listCabinetModels(url, method, data) {
  let datas = {
    url: '/api/chargingCabinetMode' + url,
    method: method
  };
  if (method == 'get') {
    datas.params = data;
  } else {
    datas.data = data;
  }
  return request(datas);
}
// 白名单管理 list
export function listOrgAdditionalUsers(url, method, data) {
  let datas = {
    url: '/api/chargingWhiteList' + url,
    method: method
  };
  if (method == 'get') {
    datas.params = data;
  } else {
    datas.data = data;
  }
  return request(datas);
}
// 资费设置管理 list
export function listCharges(url, method, data) {
  let datas = {
    url: '/api/ChargeTmplController' + url,
    method: method
  };
  if (method == 'get') {
    datas.params = data;
  } else {
    datas.data = data;
  }
  return request(datas);
}
// 开屏广告管理 list
export function listAdvertisements(url, method, data) {
  let datas = {
    url: '/api/advertisement' + url,
    method: method
  };
  if (method == 'get') {
    datas.params = data;
  } else {
    datas.data = data;
  }
  return request(datas);
}
// 消息管理 list
export function listMessages(url, method, data) {
  let datas = {
    url: '/api/massage' + url,
    method: method
  };
  if (method == 'get') {
    datas.params = data;
  } else {
    datas.data = data;
  }
  return request(datas);
}
// 我的消息管理 list
export function listUserMessages(url, method, data) {
  let datas = {
    url: '/api/messageUserController' + url,
    method: method
  };
  if (method == 'get') {
    datas.params = data;
  } else {
    datas.data = data;
  }
  return request(datas);
}
// 角色管理 list
export function listRoles(url, method, data) {
  let datas = {
    url: '/api/roles' + url,
    method: method
  };
  if (method == 'get') {
    datas.params = data;
  } else {
    datas.data = data;
  }
  return request(datas);
}
// 充电信息 list
export function listUserChargings(url, method, data) {
  let datas = {
    url: '/api/business' + url,
    method: method
  };
  if (method == 'get') {
    datas.params = data;
  } else {
    datas.data = data;
  }
  return request(datas);
}
// 参数下发 list
export function listParameterSending(url, method, data) {
  let datas = {
    url: '/api/equipment' + url,
    method: method
  };
  if (method == 'get') {
    datas.params = data;
  } else {
    datas.data = data;
  }
  return request(datas);
}
// 设备运行状态 list
export function equipmentMonitoring(url, method, data) {
  let datas = {
    url: '/api/monitoring' + url,
    method: method
  };
  if (method == 'get') {
    datas.params = data;
  } else {
    datas.data = data;
  }
  return request(datas);
}
// 枚举信息 list
export function listEnumsByType() {
  return request({url: '/api/enum/all', method: 'post'});
}
// 充电柜遥控管理
export function equipControl(url, method, data) {
  let datas = {
    url: '/api/control' + url,
    method: method
  };
  if (method == 'get') {
    datas.params = data;
  } else {
    datas.data = data;
  }
  return request(datas);
}
// 套餐包
export function packages(url, method, data) {
  let datas = {
    url: '/api/charging/package' + url,
    method: method
  };
  if (method == 'get') {
    datas.params = data;
  } else {
    datas.data = data;
  }
  return request(datas);
}
// 退款
export function refunds(url, method, data) {
  let datas = {
    url: '/api/user' + url,
    method: method
  };
  if (method == 'get') {
    datas.params = data;
  } else {
    datas.data = data;
  }
  return request(datas);
}
export function samphores(url, method, data) {
  let datas = {
    url: '/api/protocolsemaphore' + url,
    method: method
  };
  if (method == 'get') {
    datas.params = data;
  } else {
    datas.data = data;
  }
  return request(datas);
}

